import request from '@/utils/request'

const teamApi = {
  list: '/team/list',
  creat: '/team/add',
  edit: '/team/change',
  Delete: '/team/delete',
}

/**
 * teamList func
 * parameter: {
 *     username: '',
 *     password: '',
 *     captcha: '12345'
 * }
 * @param parameter
 * @returns {*}
 */
// 获取team列表
export function teamList (parameter) {
  return request({
    url: teamApi.list,
    method: 'get',
		headers: {
		  'Content-Type': 'application/json;charset=UTF-8'
		},
    params: parameter,
  })
}
// 创建team
export function teamCreat (parameter) {
  return request({
    url: teamApi.creat,
    method: 'post',
		headers: {
		  'Content-Type': 'application/json;charset=UTF-8'
		},
    params: parameter,
  })
}
// 编辑team
export function teamEdit (parameter) {
  return request({
    url: teamApi.edit,
    method: 'post',
		headers: {
		  'Content-Type': 'application/json;charset=UTF-8'
		},
    params: parameter,
  })
}
// 删除team
export function teamDelete (parameter) {
  return request({
    url: teamApi.Delete,
    method: 'post',
		headers: {
		  'Content-Type': 'application/json;charset=UTF-8'
		},
    params: parameter,
  })
}

